package c07运行环境与常用类;

/**
 * 字符串引用测试
 *
 * @author 袁炜林
 */
public class 字符串修改 {
	String str = new String("good");
	char[] ch = {'a', 'b', 'c'};

	public static void main(String args[]) {
		字符串修改 ex = new 字符串修改();
		ex.change(ex.str, ex.ch);
		System.err.print(ex.str + " and ");
		System.err.print(ex.ch);
		ex.change(ex);
		System.err.print(ex.str + " and ");
		System.err.print(ex.ch);
		String str1 = "abc";
		String str2 = str1;
		str1 = "123";
		System.err.println(str2);
		Integer i = new Integer(1000);
		ex.change(i);
		System.err.println(i);
	}

	public void change(String str, char ch[]) {
		str = "test ok";
		ch[0] = 'g';
	}

	public void change(字符串修改 ex) {
		ex.str = "你妈逼！";
	}

	public void change(Integer i) {
		i = 10;
	}
} 